<template>
	<view class="ylList">
		<view class="item" v-for="dt in lists" :key="dt._id">
			<view class="teacher">
				<view class="avatar">
					<cm-image :src="dt.productId.teacherId.selfAvatar || dt.productId.teacherId.avatar"/>
				</view>
				<view class="name">{{dt.productId.teacherId.name || dt.productId.teacherId.nickname}}</view>
				<view class="tips">{{dt.productId.teacherId.industry}} | {{dt.productId.teacherId.jobs}}</view>
				<view class="status">待开始</view>
			</view>
			<view class="wtmsbox">
				问题描述：{{dt.additionals.question_describe}}
			</view>
			<view class="tmprbox">
				<view class="time">{{dateFormat('Y-m-d',dt.startTime)}} {{dateFormat('H:s',dt.startTime)}} ~ {{dateFormat('H:s',dt.endTime)}}</view>
				<view class="price">￥<text class="bp">{{dt.productId.price}}</text></view>
			</view>
			<view class="txhy">腾讯会议id：<text class="hyid">5847965</text></view>
		</view>
	</view>
</template>

<script>
	import {defineComponent,reactive,toRefs,onMounted,getCurrentInstance,computed} from 'vue'
	import {onLoad,onShow} from '@dcloudio/uni-app'
	import { useStore } from 'vuex'
	import bodyWrap from "@/components/bodyWrap/index.vue"
	import cmImage from "@/components/cmImage/index.vue"
	import {toast,dateFormat} from "@/utils/common.js"
	export default defineComponent({
		components:{
			bodyWrap,
			cmImage
		},
		props:{
			lists:Array
		},
		setup(props,context) {
			const store = useStore()
			const {proxy} = getCurrentInstance()
			
			const state = reactive({
				userInfo:computed(()=>store.state.base.userInfo),
			})
			
			onMounted(()=>{
				
			})
			

			
			return {
				...toRefs(state),
				dateFormat
			}
		}
	})
</script>

<style lang="scss" scoped>
	.ylList{
		padding: 0 20rpx 20rpx 20rpx;
		.item{
			display: block;
			background: #fff;
			padding: 20rpx;
			margin: 20rpx 0 0 0;
			.teacher{
				display: flex;
				.avatar{
					width: 60rpx;
					height: 60rpx;
					border-radius: 50%;
					overflow: hidden;
					flex-shrink: 0;
				}
				.name{
					display: flex;
					align-items: center;
					font-size: 28rpx;
					font-weight: 700;
					padding: 0 0 0 10rpx;
					flex-shrink: 0;
				}
				.tips{
					display: flex;
					align-items: center;
					font-size: 26rpx;
					color: #999;
					padding: 0 0 0 10rpx;
					flex-shrink: 0;
					flex: 1;
				}
				.status{
					display: flex;
					align-items: center;
					color: #008800;
					font-weight: bold;
				}
			}
			.wtmsbox{
				padding: 10rpx 0 0 0;
				font-size: 28rpx;
				line-height: 50rpx;
			}
			.tmprbox{
				display: flex;
				align-items: center;
				padding: 10rpx 0 0 0;
				.time{
					color: #999;
					flex: 1;
				}
				.price{
					color: #999;
					font-size: 24rpx;
					.bp{
						font-size: 34rpx;
					}
				}
			}
			.txhy{
				padding: 10rpx 0 0 0;
				.hyid{
					font-size: 28rpx;
					color: #e3af2f;
					font-weight: bold;
				}
			}
		}
	}
</style>
